package mop.gui.component;

import javax.swing.JButton;
import javax.swing.table.AbstractTableModel;

public class JTableButtonModel extends AbstractTableModel {
    
    private Object[][] __rows = {
        { "Empty!" }
    };
    
    private String[] __columns = { "Empty!" };
    
    public String getColumnName(int column) { 
        return __columns[column];
    }
    
    public int getRowCount() {
        return __rows.length;
    }
    
    public int getColumnCount() {
        return __columns.length;
    }
    
    public Object getValueAt(int row, int column) { 
        return __rows[row][column];
    }
    
    public boolean isCellEditable(int row, int column) {
        return false;
    }
    
    public Class getColumnClass(int column) {
        return getValueAt(0, column).getClass();
    }
    
    public void setRows(Object[][] rows)
    {
        this.__rows = rows;
    }
    
    public void setColumns(String[] columns)
    {
        this.__columns = columns;
    }
    
}